const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
    entry: './src/index.js',
    output: {
        filename: 'index.js',
        path: path.resolve(__dirname, 'build')
    },
    mode: 'production',
    plugins: [
        new HtmlWebpackPlugin({
            template: './index.html'
        })
    ],

    devServer: {
        port: 1000,
        proxy: {
            '/test': {
                target: "http://127.0.0.1:3000/server4",
                changeOrigin: true,
                pathRewrite: {
                    '^/test': ''
                }
            }
        },
    },
}